﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SadlandVillage.Core;
using SadlandVillage.Minigames.Restaurant.Helper;
using Microsoft.Xna.Framework;

namespace SadlandVillage.Minigames.Restaurant
{

    /*public class RestaurantCinematic : GameScene
    {

        Plates plates;
        Dish dish;

        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                this.Exit();

            switch (gameModes)
            {
                case GameModes.NewLevel:
                    gameModes = GameModes.Stopped;
                    StartNewPlate();
                    gameModes = GameModes.Running;
                    break;
                case GameModes.Running:
                    break;
                case GameModes.Stopped:
                    break;
                case GameModes.GameOver:
                    break;
                default:
                    break;
            }

            base.Update(gameTime);
        }

        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Draw(GameTime gameTime)
        {
            graphics.GraphicsDevice.Clear(Color.CornflowerBlue);

            base.Draw(gameTime);
        }

        private void StartNewPlate()
        {
            bool finish = false;

            if (dish != null)
            {
                dish.Dispose();
            }

            switch (plates)
            {
                case Plates.Pizza:
                    dish = new Dish(this, pizzaEmpty, pizzaFull, 7000, plates, Plates.Chicken);
                    break;
                case Plates.Chicken:
                    dish = new Dish(this, chickenEmpty, chickenFull, 15000, plates, Plates.Feijoada);
                    break;
                case Plates.Feijoada:
                    dish = new Dish(this, feijoadaEmpty, feijoadaFull, 14000, plates, Plates.Fish);
                    break;
                case Plates.Fish:
                    dish = new Dish(this, fishEmpty, fishFull, 20000, plates, Plates.FoieGras);
                    break;
                case Plates.FoieGras:
                    dish = new Dish(this, foieGrasEmpty, foieGrasFull, 17000, plates, Plates.Lobster);
                    break;
                case Plates.Lobster:
                    dish = new Dish(this, lobsterEmpty, lobsterFull, 20000, plates, Plates.Sandwich);
                    break;
                case Plates.Sandwich:
                    dish = new Dish(this, sandwichEmpty, sandwichFull, 12000, plates, Plates.Sushi);
                    break;
                case Plates.Sushi:
                    dish = new Dish(this, sushiEmpty, sushiFull, 25000, plates, Plates.None);
                    break;
                case Plates.None:
                    finish = true;
                    break;
                default:
                    break;
            }

            if (!finish)
            {
                dish.PlateLoser += new Dish.PlateLoserEventHandle(Plate_PlateLoser);
                Components.Add(dish);
            }
            else
            {
                gameModes = GameModes.GameOver;
                Components.Add(new GameOver(this));
            }
        }
    }*/
}
